﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Arbetsfornedringen
{
    public partial class Site : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Content.Visible == false)
            {
                Content.Visible = true;
            }
            
            //if (Session["Account"] != null)
            //{
            //    ButtonLogOut.Attributes.CssStyle.Value = "Visible";
            //}
        }

        protected void ButtonLogOut_Click(object sender, EventArgs e)
        {
            Session.Clear();
            Response.Redirect(@"Default.aspx");
        }

        protected void ButtonLogIn_Click(object sender, EventArgs e)
        {
            Response.Redirect(@"Register.aspx");
        }

        public void LogOut(object sender, EventArgs e)
        {
            Session["Account"] = null;
            Response.Redirect("Default.aspx");
        }
    }
}